package club.banyuan.dog;

import club.banyuan.cat.Cat;

public class Dog {
    private String breed;
    private int iq;

    public Dog(String breed, int iq) {
        this.breed = breed;
        this.iq = iq;
    }

    public String getInfo() {
        if (this.iq < 20)
            return "傻" + this.breed;
        else if (this.iq <= 80)
            return "普通的" + this.breed;
        else
            return "聪明的" + this.breed;
    }

    public void printInfo() {
        System.out.println(getInfo());
    }

    public void playWith(Cat cat) {
        System.out.println(this.breed + "和" + cat.getBreed() + "一起玩");

    }
}
